import request from '@/plugins/axios'

export function getPage(params) {
    return request({
        url: '/products/getPage',
        method: "post",
        data: params
    })
}
export function goodsTypeList() {
    return request({
        url: '/productCategories/all',
        method: "get",
    })
}
export function suppliersList() {
    return request({
        url: '/supplier/getSupplierAll',
        method: "get",
    })
}

export function addProducts(params) {
    return request({
        url: '/products/create',
        method: "post",
        data: params
    })
}

export function updProducts(params) {
    return request({
        url: '/products/update',
        method: "put",
        data: params
    })
}

export function delProducts(id) {
    return request({
        url: '/products/delete/'+id,
        method: "delete",
    })
}

export function showProducts() {
    return request({
        url: '/products/stockWithEcharts',
        method: "post",
    })
}

